

package cn.shengchao.examstar.product.domain.valobj;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

@Data
public class ProductName {
    private String value;

    private ProductName(String value) {
        this.value = value;
    }

    public static ProductName of(String name) {
        if (StrUtil.isEmpty(name))
            throw new IllegalArgumentException("产品名称不能为空");
        return new ProductName(name);
    }

}
